# Generate the COINCbcConfig.cmake file in the build tree.  Also configure
# one for installation.  The file tells external projects how to use
# COINCbc.

#-----------------------------------------------------------------------------
# Settings specific to the build tree.

# The "use" file.
SET(COINCbc_USE_FILE ${CMAKE_INSTALL_PREFIX}/cmake/UseCOINCbc.cmake)

# The library dependencies file.
SET(COINCbc_LIBRARY_DEPENDS_FILE ${CMAKE_INSTALL_PREFIX}/cmake/COINCbcLibraryDepends.cmake)

# The build settings file.
SET(COINCbc_BUILD_SETTINGS_FILE ${CMAKE_INSTALL_PREFIX}/cmake/COINCbcBuildSettings.cmake)

# Library directory.
SET(COINCbc_LIBRARY_DIRS_CONFIG ${CMAKE_INSTALL_PREFIX}/lib)

# Determine the include directories needed.
SET(COINCbc_INCLUDE_DIRS_CONFIG
  ${COINCbc_INCLUDE_DIRS_BUILD_TREE}
  ${COINCbc_INCLUDE_DIRS_SOURCE_TREE}
  ${COINCbc_INCLUDE_DIRS_SYSTEM}
)

#-----------------------------------------------------------------------------
# Configure COINCbcConfig.cmake for the build tree.
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/COINCbcConfig.cmake.in
               ${CMAKE_INSTALL_PREFIX}/cmake/COINCbcConfig.cmake @ONLY IMMEDIATE)

#-----------------------------------------------------------------------------
# Settings specific to the install tree.

# The "use" file.
SET(COINCbc_USE_FILE ${CMAKE_INSTALL_PREFIX}/cmake/UseCOINCbc.cmake)

# The library dependencies file.
SET(COINCbc_LIBRARY_DEPENDS_FILE
    ${CMAKE_INSTALL_PREFIX}/cmake/COINCbcLibraryDepends.cmake)

# The build settings file.
SET(COINCbc_BUILD_SETTINGS_FILE
    ${CMAKE_INSTALL_PREFIX}/cmake/COINCbcBuildSettings.cmake)

# Include directories.
SET(COINCbc_INCLUDE_DIRS_CONFIG
  ${COINCbc_INCLUDE_DIRS_INSTALL_TREE}
  ${COINCbc_INCLUDE_DIRS_SYSTEM}
  ${CMAKE_INSTALL_PREFIX}/include
  ${CMAKE_INSTALL_PREFIX}/include/coin
)

